﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace A2DFramework.LockService
{
    public class A2DLock:IDisposable
    {
        private ILock lockService = null;

        public A2DLock(ILock lockService)
        {
            this.lockService = lockService;
        }

        public string LockName { get; set; }

        public string RealLockIdentity { get; set; }

        public void Dispose()
        {
            this.lockService.ReleaseLock(this);
        }

        public IDisposable RawLockObject { get; set; }
    }
}
